PoPL Lecture 1

Checking the course pages

Link to course pages

Class structure and Evaluation

More on Evals

Course objectives

(read from the objectives page)

Misc

Languages as human meta-technology

Evolution of programming languages

Other paradigms:

Future:

Questions addressed in POPL

  1. What is a program
  2. What is a programming language
  3. What is an abstract machine
  4. ??

Approach taken

Basics of Functional Programming

What is functional programming

Why functional Programming

A very short tour of racket

Website: racketlang. Also the reading assignment for this week.

Function for max:

(define (max x y)
    (if (> x y) ;; test
        x       ;; then
        y     ;; else
    )
)

Factorial:

(define (! n)
    (if (= n 0)
        1
        (* n (! (- n 1)))
    )    
)

Another Factorial:

(define (!/acc n)
    (!-helper n 1)
)

(define (!-helper i a)
    (if (= i 0)
        a
        (!-helper (- i 1) (* a i))
    )
)